package javashiyanbaogao;

public class trycatch {
    public static void main(String[] args) {
        int[] arr={1,2,3,4,5,6};
        int i=0;
        try {
            for (i = 0; i <= arr.length; i++) {
                System.out.println(arr[i]);
            }
        }
        catch(ArrayIndexOutOfBoundsException e){
            System.out.println("角标越界");
        }
        System.out.println("over");
    }
}
